(global.webpackJsonp = global.webpackJsonp || []).push([
  ["wjyk_recycle/pages/recycle-confirm/recycle-confirm"], {
    "4c10": function (e, t, i) {
      i.r(t);
      var r, c = i("4c44"),
        s = i("7f9c");
      for (r in s) "default" !== r && function (e) {
        i.d(t, e, function () {
          return s[e];
        });
      }(r);
      i("cb21");
      var a = i("f0c5"),
        c = Object(a.a)(s.default, c.b, c.c, !1, null, null, null, !1, c.a, void 0);
      t.default = c.exports;
    },
    "4c44": function (e, t, i) {
      function r() {
        var e = this,
          t = (e.$createElement, e._self._c, Number(e.totalPrice).toFixed(2)),
          i = Number(e.profitPrice).toFixed(2);
        e.$mp.data = Object.assign({}, {
          $root: {
            g0: t,
            g1: i
          }
        });
      }
      var c = [];
      i.d(t, "b", function () {
        return r;
      }), i.d(t, "c", function () {
        return c;
      }), i.d(t, "a", function () {});
    },
    "6c5b": function (e, t, i) {
      (function (e) {
        function t(e) {
          return e && e.__esModule ? e : {
            default: e
          };
        }
        i("8163"), t(i("66fd")), e(t(i("4c10")).default);
      }).call(this, i("543d").createPage);
    },
    "7f9c": function (e, t, i) {
      i.r(t);
      var r, c = i("d22f"),
        s = i.n(c);
      for (r in c) "default" !== r && function (e) {
        i.d(t, e, function () {
          return c[e];
        });
      }(r);
      t.default = s.a;
    },
    "964f": function (e, t, i) {},
    cb21: function (e, t, i) {
      var r = i("964f");
      i.n(r).a;
    },
    d22f: function (e, i, r) {
      (function (a) {
        Object.defineProperty(i, "__esModule", {
          value: !0
        }), i.default = void 0;
        var o = e(r("4795")),
          l = e(r("5438"));

        function e(e) {
          return e && e.__esModule ? e : {
            default: e
          };
        }

        function n(e, t, i, r, c, s, a) {
          try {
            var o = e[s](a),
              l = o.value;
          } catch (e) {
            return i(e), 0;
          }
          o.done ? t(l) : Promise.resolve(l).then(r, c);
        }

        function u(o) {
          return function () {
            var e = this,
              a = arguments;
            return new Promise(function (t, i) {
              var r = o.apply(e, a);

              function c(e) {
                n(r, t, i, c, s, "next", e);
              }

              function s(e) {
                n(r, t, i, c, s, "throw", e);
              }
              c(void 0);
            });
          };
        }
        var t = {
          data: function () {
            return {
              pic_url: this.$imgUrl,
              name: "",
              orderid: "",
              orderList: [],
              collectorid: "",
              cateList: [],
              typeList: [],
              multiArray: [],
              multiIndex: [0, 0, 0],
              is_offline: "",
              firstVal: "",
              firstId: "",
              secondVal: "",
              secondId: "",
              number: "",
              unit: "",
              price: "",
              partnerid: "",
              user_price: "",
              collector_price: 0,
              totalPrice: 0,
              recyclePrice: 0,
              profitPrice: 0,
            };
          },
          onShow: function () {
            l.default.releaseKey("submit"), this.collectorSet();
          },
          onLoad: function (e) {
            this.name = a.getStorageSync("name"), this.orderid = e.orderid, this.collectorid = e.collectorid,
              this.partnerid = e.partnerid, console.log("options", e), this.reserveOrderDetail(),
              this.reserveCateList();
          },
          methods: {
            collectorSet: function () {
              var i = this;
              return u(o.default.mark(function e() {
                var t;
                return o.default.wrap(function (e) {
                  for (;;) switch (e.prev = e.next) {
                    case 0:
                      return e.next = 2, i.$http({
                        url: i.$api.collectorSet
                      });

                    case 2:
                      0 == (t = e.sent).errno && (i.is_offline = t.data.is_offline);

                    case 4:
                    case "end":
                      return e.stop();
                  }
                }, e);
              }))();
            },
            changeInput: function (e) {
              if (1 != e.target.value.indexOf(".", e.target.value.length - 1)) {
                var t = e.currentTarget.dataset.index,
                  e = e.detail.value;
                this.cateList[t].number = Number(Number(e).toFixed(2)), this.cateList[t].price = (this.cateList[t].number * Number(this.cateList[t].user_price)).replace(/\.{2,}/g, ".");
                for (var i = 0; i < this.cateList.length; i++) 0 == i ? (this.totalPrice = Number(Number(this.cateList[i].price).toFixed(2)),
                  this.recyclePrice = Number((this.cateList[i].number * Number(this.cateList[i].collector_price)).toFixed(2))) : (this.totalPrice += Number(Number(this.cateList[i].price).toFixed(2)),
                  this.recyclePrice += Number((this.cateList[i].number * Number(this.cateList[i].collector_price)).toFixed(2)));
                this.profitPrice = Number((Number(this.recyclePrice) - Number(this.totalPrice)).toFixed(2)),
                  console.log("数量", this.profitPrice, this.totalPrice, this.cateList);
              }
            },
            getPrice: function (e) {
              var t = e.currentTarget.dataset.index,
                e = Number(e.detail.value);
              this.user_price = Number(e), console.log("操作的下标：", t, e), this.cateList[t].user_price = e || 0;
              for (var i = 0, r = 0, c = 0; c < this.cateList.length; c++) {
                var s = Number(this.cateList[c].user_price),
                  a = Number(this.cateList[c].number),
                  o = Number(this.cateList[c].collector_price);
                this.cateList[c].price = (a * s).toFixed(2), i += s * a;
                var l = o - s;
                r += l * a, console.log("99999999--------", s, a, o, i, l, r);
              }
              this.totalPrice = i, this.profitPrice = r, console.log("价格getPrice", i, r);
            },
            bindMultiPickerChange: function (e) {
              var t = 0;
              console.log("==============", e, e.detail, this.cateList), console.log("第一个值", this.multiArray[0][e.detail.value[0]].name, this.multiArray[0][e.detail.value[0]].id),
                console.log("第二个值", this.multiArray[1][e.detail.value[1]], this.multiArray[1][e.detail.value[1]].name, this.multiArray[1][e.detail.value[1]].id),
                console.log("第三个值", this.multiArray[2], this.multiArray[2][e.detail.value[2]].collector_price),
                this.firstVal = this.multiArray[0][e.detail.value[0]].name, this.firsId = this.multiArray[0][e.detail.value[0]].id,
                this.secondVal = this.multiArray[1][e.detail.value[1]].name, this.secondId = this.multiArray[1][e.detail.value[1]].id,
                this.unit = this.multiArray[1][e.detail.value[1]].unit, this.user_price = this.multiArray[2][e.detail.value[2]].user_price,
                this.collector_price = this.multiArray[2][e.detail.value[2]].collector_price;
              for (var i = 0; i < this.cateList.length; i++) this.cateList[i].firsId == this.firsId && this.cateList[i].secondId == this.secondId && (this.cateList[i].number = this.cateList[i].number + 1,
                this.cateList[i].price = (this.cateList[i].number * this.cateList[i].user_price).toFixed(2),
                this.totalPrice = (Number(this.totalPrice) + Number(this.cateList[i].price)).toFixed(2),
                this.recyclePrice = (Number(this.recyclePrice) + Number(this.cateList[i].collector_price)).toFixed(2),
                this.profitPrice = (Number(this.recyclePrice) - Number(this.totalPrice)).toFixed(2),
                t = 1, console.log("11111111111111", Number(this.recyclePrice), Number(this.cateList[i].collector_price)));
              0 == t && (this.totalPrice = (Number(this.totalPrice) + Number(this.user_price)).toFixed(2),
                this.recyclePrice = (Number(this.recyclePrice) + Number(this.collector_price)).toFixed(2),
                this.profitPrice = (Number(this.recyclePrice) - Number(this.totalPrice)).toFixed(2),
                console.log("2222222222222", Number(this.recyclePrice), Number(this.collector_price)),
                this.cateList.push({
                  firsId: this.firsId,
                  firstVal: this.firstVal,
                  secondId: this.secondId,
                  secondVal: this.secondVal,
                  price: this.user_price,
                  number: 1,
                  unit: this.unit,
                  user_price: this.user_price,
                  collector_price: this.collector_price
                })), console.log("------------", this.cateList);
            },
            bindMultiPickerColumnChange: function (e) {
              console.log("修改的列为", e, e.detail.column, "，值为", e.detail.value), 0 == e.detail.column && (this.multiIndex[0] = e.detail.value,
                this.multiIndex[1] = 0, this.multiIndex[2] = 0, console.log("aaaaaaaaaaaaaaa", this.multiIndex),
                this.setRange()), 1 == e.detail.column && (this.multiIndex[1] = e.detail.value,
                this.multiIndex[2] = e.detail.value, console.log("bbbbbbbbbbbbb", this.multiIndex),
                this.setRange());
            },
            setRange: function () {
              var t = [
                [],
                [],
                []
              ];
              this.typeList.forEach(function (e) {
                console.log("000", e, t), t[0].push({
                  id: e.id,
                  name: e.name
                });
              }), this.typeList[this.multiIndex[0]].children.forEach(function (e) {
                t[1].push({
                  id: e.id,
                  name: e.name,
                  unit: e.unit
                });
              }), this.typeList[this.multiIndex[0]].children[this.multiIndex[1]].children.forEach(function (e) {
                t[2].push({
                  name: e.reference + e.user_price,
                  user_price: e.user_price,
                  collector_price: e.collector_price
                });
              }), this.multiArray = t, this.$forceUpdate();
            },
            bidConfirm: function (c) {
              var s = this;
              return u(o.default.mark(function e() {
                var t, i, r;
                return o.default.wrap(function (e) {
                  for (;;) switch (e.prev = e.next) {
                    case 0:
                      if (t = !0, 0 == s.cateList.length) return s.$sun.toast("请添加物品"), t = !1, e.abrupt("return");
                      e.next = 5;
                      break;

                    case 5:
                      r = i = 0;

                    case 7:
                      if (!(r < s.cateList.length)) {
                        e.next = 19;
                        break;
                      }
                      if (console.log("11111", s.cateList[r], s.cateList[r].price), null == s.cateList[r].user_price || "" == s.cateList[r].user_price || null == s.cateList[r].user_price) return s.$sun.toast("请输入回收价格"),
                        t = !1, e.abrupt("return");
                      e.next = 15;
                      break;

                    case 15:
                      i += Number(s.cateList[r].price);

                    case 16:
                      r++, e.next = 7;
                      break;

                    case 19:
                      console.log("分类内容", s.cateList, i), t && l.default.uniDoFunc({
                        key: "submit",
                        success: function () {
                          var e = u(o.default.mark(function e() {
                            return o.default.wrap(function (e) {
                              for (;;) switch (e.prev = e.next) {
                                case 0:
                                  l.default.lockKey("submit"), console.log("防抖... 在事件触发前连续点击事件会重新计时"), s.$http({
                                    url: s.$api.collectorRecycleSure,
                                    data: {
                                      orderid: s.orderid,
                                      collectorid: s.collectorid,
                                      actual: s.cateList,
                                      total: i.toFixed(2),
                                      pay_type: c
                                    }
                                  }).then(function (e) {
                                    console.log("res11111111", e), a.showModal({
                                      title: "提示",
                                      showCancel: !1,
                                      content: e.message,
                                      success: function (e) {
                                        if (e.confirm) l.default.releaseKey("submit"), a.navigateBack({
                                          delta: 1
                                        });
                                        else if (e.cancel) return;
                                      }
                                    });
                                  }).catch(function (e) {
                                    a.showModal({
                                      title: "提示",
                                      showCancel: !1,
                                      content: e.data.message,
                                      success: function (e) {
                                        if (e.confirm) console.log("=========================="), l.default.releaseKey("submit"),
                                          a.navigateTo({
                                            url: "/wjyk_recycle/pages/recycle-center/recycle-center?collectorid=" + s.collectorid
                                          });
                                        else if (e.cancel) return;
                                      }
                                    });
                                  });

                                case 3:
                                case "end":
                                  return e.stop();
                              }
                            }, e);
                          }));
                          return function () {
                            return e.apply(this, arguments);
                          };
                        }()
                      });

                    case 21:
                    case "end":
                      return e.stop();
                  }
                }, e);
              }))();
            },
            reduce: function (e, t) {
              1 < e && (this.cateList[t].number = e - 1, this.cateList[t].price = (this.cateList[t].number * this.cateList[t].user_price).toFixed(2),
                  this.totalPrice = (Number(this.totalPrice) - Number(this.cateList[t].user_price)).toFixed(2),
                  this.recyclePrice = (Number(this.recyclePrice) - Number(this.cateList[t].collector_price)).toFixed(2),
                  this.profitPrice = (Number(this.recyclePrice) - Number(this.totalPrice)).toFixed(2)),
                console.log("=========", Number(this.totalPrice), Number(this.cateList[t].user_price)),
                console.log("点击减号", e, this.cateList[t], this.cateList);
            },
            add: function (e, t) {
              this.cateList[t].number = e + 1, this.cateList[t].price = (this.cateList[t].number * this.cateList[t].user_price).toFixed(2),
                this.totalPrice = (Number(this.totalPrice) + Number(this.cateList[t].user_price)).toFixed(2),
                this.recyclePrice = (Number(this.recyclePrice) + Number(this.cateList[t].collector_price)).toFixed(2),
                this.profitPrice = (Number(this.recyclePrice) - Number(this.totalPrice)).toFixed(2),
                console.log("点击加号", e, this.cateList[t], this.cateList);
            },
            deleteList: function (e) {
              console.log("this.cateList[index]", this.cateList[e]), this.totalPrice = (Number(this.totalPrice) - this.cateList[e].number * Number(this.cateList[e].user_price)).toFixed(2),
                this.recyclePrice = (Number(this.recyclePrice) - this.cateList[e].number * Number(this.cateList[e].collector_price)).toFixed(2),
                this.profitPrice = (Number(this.recyclePrice) - Number(this.totalPrice)).toFixed(2),
                this.cateList.splice(e, 1), console.log("点击了删除", e, this.cateList);
            },
            reserveCateList: function () {
              var i = this;
              return u(o.default.mark(function e() {
                var t;
                return o.default.wrap(function (e) {
                  for (;;) switch (e.prev = e.next) {
                    case 0:
                      return e.next = 2, i.$http({
                        url: i.$api.reserveCateList,
                        data: {
                          partnerid: i.partnerid
                        }
                      });

                    case 2:
                      0 == (t = e.sent).errno && (i.typeList = t.data, console.log("回收类型列表", t, i.typeList),
                        i.setRange());

                    case 4:
                    case "end":
                      return e.stop();
                  }
                }, e);
              }))();
            },
            reserveOrderDetail: function () {
              var i = this;
              return u(o.default.mark(function e() {
                var t;
                return o.default.wrap(function (e) {
                  for (;;) switch (e.prev = e.next) {
                    case 0:
                      return e.next = 2, i.$http({
                        url: i.$api.reserveOrderDetail,
                        data: {
                          id: i.orderid
                        }
                      });

                    case 2:
                      0 == (t = e.sent).errno && (1 == t.data.flag && (i.cateList = t.data.actual), 0 == t.data.flag && (i.cateList = t.data.content),
                        i.totalPrice = t.data.total, i.recyclePrice = t.data.collector_total, i.profitPrice = t.data.collector_profit,
                        console.log("回收订单详情", t));

                    case 4:
                    case "end":
                      return e.stop();
                  }
                }, e);
              }))();
            }
          }
        };
        i.default = t;
      }).call(this, r("543d").default);
    }
  },
  [
    ["6c5b", "common/runtime", "common/vendor"]
  ]
]);